#include <stdio.h>

int main(int argc, char *argv[])
{
	int s[35][35] = {0};
	int m, n, i, j;
	
	scanf("%d %d", &n, &m);
	s[0][0] = 1;
	for (i=1; i<=m; i++) {
		s[i][0] = s[i-1][1] + s[i-1][n-1];
		for (j=1; j<=n-2; j++) {
			s[i][j] = s[i-1][j-1] + s[i-1][j+1];
		}
		s[i][n-1] = s[i-1][0] + s[i-1][n-2];
	}

	printf("%d\n", s[m][0]);

	return 0;
}
